import 'package:json_annotation/json_annotation.dart';

part 'scout_login_model.g.dart';


@JsonSerializable()
class ScoutLoginModel extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'data')
  ScoutLoginData scoutLoginData;

  ScoutLoginModel(this.code,this.message,this.scoutLoginData,);

  factory ScoutLoginModel.fromJson(Map<String, dynamic> srcJson) => _$ScoutLoginModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ScoutLoginModelToJson(this);

}


@JsonSerializable()
class ScoutLoginData extends Object {

  @JsonKey(name: 'id')
  int id;

  @JsonKey(nullable: true,name: 'real_name')
  dynamic realName;

  @JsonKey(name: 'nickname')
  String nickname;

  @JsonKey(name: 'email')
  String email;

  @JsonKey(name: 'phone')
  String phone;

  @JsonKey(name: 'avatar')
  String avatar;

  @JsonKey(name: 'password')
  String password;

  @JsonKey(name: 'openid')
  dynamic openid;

  @JsonKey(name: 'sex')
  int sex;

  @JsonKey(nullable: true,name: 'balance')
  dynamic balance;

  @JsonKey(name: 'user_type')
  int userType;

  @JsonKey(name: 'type')
  int type;

  @JsonKey(nullable: true,name: 'user_cars')
  dynamic userCars;

  @JsonKey(nullable: true,name: 'is_wechat')
  dynamic isWechat;

  @JsonKey(nullable: true,name: 'is_real')
  dynamic isReal;

  @JsonKey(nullable: true,name: 'wechat')
  dynamic wechat;

  @JsonKey(nullable: true,name: 'address_id')
  dynamic addressId;

  @JsonKey(name: 'address')
  String address;

  @JsonKey(name: 'status')
  int status;

  @JsonKey(name: 'created_at')
  int createdAt;

  @JsonKey(name: 'updated_at')
  int updatedAt;

  @JsonKey(nullable: true,name: 'deleted_at')
  dynamic deletedAt;

  ScoutLoginData(this.id,this.realName,this.nickname,this.email,this.phone,this.avatar,this.password,this.openid,this.sex,this.balance,this.userType,this.type,this.userCars,this.isWechat,this.isReal,this.wechat,this.addressId,this.address,this.status,this.createdAt,this.updatedAt,this.deletedAt,);

  factory ScoutLoginData.fromJson(Map<String, dynamic> srcJson) => _$ScoutLoginDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ScoutLoginDataToJson(this);

}


